package cn.jhz.learn.blog.test.impl;

import java.util.function.Supplier;

import cn.jhz.learn.blog.common.exception.OperationException;
import cn.jhz.learn.blog.common.exception.ParamException;

class ExceptionConstant{
	final static String CATEGORY_IS_NOT_EXIST_ERROR_STRING = "错误参数，该分类不存在！";
	final static String SUBFIELD_IS_NOT_EXIST_ERROR_STRING = "错误参数，该分类不存在！";
	
	final static String PARAM_ARTICLE_TITLE_IS_EMPTY_ERROR_STRING = "错误参数，标题为空字符串！";
	final static String PARAM_ARTICLE_TITLE_IS_NULL_ERROR_STRING = "错误参数，标题为空！";
	
	final static String PARAM_ARTICLE_IS_NOT_EXIST_ERROR_STRING = "错误参数，文章不存在！";
	final static String PARAM_ARTICLE_ID_IS_NULL_ERROR_STRING = "错误参数，文章ID为空！";
	
	final static String PARAM_PHOTO_IS_NOT_EXIST_ERROR_STRING = "错误参数，文章不存在！";
	final static String PARAM_ESSAY_IS_NOT_EXIST_ERROR_STRING = "错误参数，短文不存在！";

	final static String PARAM_LABEL_SET_IS_EMPTY_ERROR_STRING = "错误参数，标签集合为空！";
	final static String PARAM_LABEL_SET_IS_NULL_ERROR_STRING = "错误参数，标签集合不存在！";

	final static String PARAM_BLOGGER_IS_NOT_EXIST_ERROR_STRING = "错误参数，博客不存在！";
	final static String PARAM_GUESTBOOK_IS_NOT_EXIST_ERROR_STRING = "错误参数，评论不存在！";

	final static String PARAM_COMMENT_IS_NOT_EXIST_ERROR_STRING = "错误参数，评论不存在！";

	final static String FILE_IS_NOT_EXIST_ERRORR_STRING = "文件不存在！";
	final static String FILE_IS_NOT_LEGAL_ERROR_STRING = "文件不合法！";

	final static String ARGUMENT_PHOTO_IS_NULL_ERROR_STRING = "错误参数，照片为空！";
	final static String ARGUMENT_SUBFIELD_IS_NULL_ERROR_STRING = "错误参数，分支为空！";
	final static String ARGUMENT_FILE_IS_NULL_ERROR_STRING = "错误参数，文件为空！";
	final static String ARGUMENT_PARAM_IS_NULL_ERROR_STRING = "参数为空！";
	
	final static String OPERATE_FAILED_TO_TRANSFER_FILE_ERROR_STRING = "文件传输，操作失败！";
	final static String OPERATE_FAILED_TO_REMOVE_ARTICLE_ERROR_STRING = "删除文章，操作失败！";
	final static String OPERATE_FAILED_TO_FIND_ARTICLE_ERROR_STRING = "获取文章，操作失败！";
	final static String OPERATE_FAILED_CAUSE_BY_INSUFFICIENT_ACCESS = "操作失败，没有访问权限";

	final static Supplier<ParamException> paramCategoryIsNotExist = ()-> new ParamException(CATEGORY_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> paramSubfieldIsNotExist = ()-> new ParamException(SUBFIELD_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> paramArticleTitleIsEmpty = ()-> new ParamException(PARAM_ARTICLE_TITLE_IS_EMPTY_ERROR_STRING);
	final static Supplier<ParamException> paramArticleTitleIsNull = ()-> new ParamException(PARAM_ARTICLE_TITLE_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> paramArticleIsNotExist = ()-> new ParamException(PARAM_ARTICLE_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> paramArticleIdIsNull = ()-> new ParamException(PARAM_ARTICLE_ID_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> paramLabelsIsEmpty = ()-> new ParamException(PARAM_LABEL_SET_IS_EMPTY_ERROR_STRING);
	final static Supplier<ParamException> paramLabelsIsNull = ()-> new ParamException(PARAM_LABEL_SET_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> paramGuestbookIsNotExist = ()-> new ParamException(PARAM_GUESTBOOK_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> paramCommentIsNotExist =
			()-> new ParamException(PARAM_COMMENT_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> paramPhotoIsNotExist =
			()-> new ParamException(PARAM_ARTICLE_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> fileIsNotExist =
			()-> new ParamException(FILE_IS_NOT_EXIST_ERRORR_STRING);
	final static Supplier<ParamException> fileIsNotlegal =
			()-> new ParamException(FILE_IS_NOT_LEGAL_ERROR_STRING);
	final static Supplier<ParamException> argumentParamIsNull =
			()-> new ParamException(ARGUMENT_PARAM_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> argumentSubfieldIsNull =
			()-> new ParamException(ARGUMENT_SUBFIELD_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> argumentPhotoIsNull =
			()-> new ParamException(ARGUMENT_PHOTO_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> argumentFileIsNull =
			()-> new ParamException(ARGUMENT_FILE_IS_NULL_ERROR_STRING);
	final static Supplier<ParamException> paramEssayIsNotExist =
			()-> new ParamException(PARAM_ESSAY_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<ParamException> paramBloggerIsNotExist =
			()-> new ParamException(PARAM_BLOGGER_IS_NOT_EXIST_ERROR_STRING);
	final static Supplier<OperationException> failedToRemoveArticle =
			()-> new OperationException(OPERATE_FAILED_TO_REMOVE_ARTICLE_ERROR_STRING);
	final static Supplier<OperationException> failedToFindArticle =
			()-> new OperationException(OPERATE_FAILED_TO_FIND_ARTICLE_ERROR_STRING);
	final static Supplier<OperationException> failedToTransferFile =
			()-> new OperationException(OPERATE_FAILED_TO_TRANSFER_FILE_ERROR_STRING);
	final static Supplier<OperationException>  insufficientAccess =
			()-> new OperationException(OPERATE_FAILED_CAUSE_BY_INSUFFICIENT_ACCESS);
}